<form class="layui-form" lay-filter="tpl_category{$category_sign}" action="{:url('category/saveData')}">
	<input type="hidden" name="category_sign" class="layui-input" />
	<input type="hidden" name="category_id" class="layui-input" />
	<div class="layui-form-item">
		<label class="layui-form-label">上级分类</label>
		<div class="layui-input-inline">
			<select name="parent_sign" lay-filter="parent_sign" lay-search>
				<option value="0">根目录</option>
				{volist name="category_info" id="list"}
				<option value="{$list.category_sign}">{$list.category_name}</option>
				{volist name="list['_']" id="vo"}
				<option value="{$vo.category_sign}">├─{$vo.category_name}</option>
				{/volist}
				{/volist}
			</select>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">分类名称</label>
		<div class="layui-input-inline">
			<input type="text" name="category_name" lay-verify="required" placeholder="请输入分类名称" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">英文缩写</label>
		<div class="layui-input-inline">
			<input type="text" name="initails" placeholder="" autocomplete="off" class="layui-input">
		</div>
	</div>
	{if condition="$get_site['site_name'] EQ '主站'"}
	<div class="layui-form-item">
		<label class="layui-form-label">折扣率</label>
		<div class="layui-input-inline">
			<input type="text" name="site_rate" value="100" placeholder="" autocomplete="off" class="layui-input">
		</div>
	</div>
	{/if}
	<div class="layui-form-item">
		<label class="layui-form-label">接口参数</label>
		<div class="layui-input-inline">
			<input type="text" name="api_option" placeholder="" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">分类图标</label>
		<div class="layui-input-block">
			<blockquote class="layui-elem-quote layui-quote-nm layui-col-xs11 layui-col-sm11 layui-col-md11">
				<div class="layui-upload-list" id="layui-upload-list{$category_sign}"></div>
				<div class="layui-upload-drag category_picture_upload" id="category_picture_upload{$category_sign}">
				  <i class="layui-icon layui-icon-upload"></i>
				  <p>点击或拖拽上传</p>
				</div>
			</blockquote>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">排序</label>
		<div class="layui-input-inline">
			<input type="number" name="sort" lay-verify="required|number" value="0" autocomplete="off" class="layui-input layui-number">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">分类属性<span class="layui-form-mid layui-word-aux" style="float: none;"><i class="layui-icon layui-icon-tips" data-title="自动覆盖上级分类属性，自动保存"></i></span></label>
		<div class="layui-input-inline" style="width: 80%;">
			<table class="layui-hide" id="attr_list{$category_sign}" lay-filter="attr_list{$category_sign}"></table>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">分类品牌<span class="layui-form-mid layui-word-aux" style="float: none;"><i class="layui-icon layui-icon-tips" data-title="自动覆盖上级分类品牌，自动保存"></i></span></label>
		<div class="layui-input-block">
			<blockquote class="layui-elem-quote layui-quote-bl layui-elem-quote-height layui-col-xs5 layui-col-sm5 layui-col-md5" id="selected_brand{$category_sign}">
				<div class="layui-input-inline"><input type="search" class="layui-input" placeholder="搜索品牌"></div>
				<div class="box"></div>
			</blockquote>
			<blockquote class="layui-elem-quote layui-quote-gn layui-elem-quote-height  layui-col-xs6 layui-col-sm6 layui-col-md6" id="select_brand{$category_sign}">
				<div class="layui-input-inline"><input type="search" class="layui-input" placeholder="搜索更多品牌"></div>
				<div class="box"></div>
			</blockquote>
		</div>
	</div>
	<div class="layui-form-item">
		<div class="layui-input-block">
			<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submit_category">保存数据</button>
			<button type="reset" class="layui-btn layui-btn-primary">重置</button>
		</div>
	</div>
</form>
<script>
	// 赋值
	var category_sign = "{$category_sign}";
	var category_form_value = {$data};
	var attr_list_url = "{:url('Attr/ajaxAttr',array('category_sign'=>$category_sign))}";
	var attr_delete_url = "{:url('Attr/ajaxDelete')}";
	var attr_one_url = "{:url('Attr/ajaxOneData')}";
	var attr_save_url = "{:url('Attr/saveData')}";
	var attr_cols = {$cols_attr};
	var add_attr_url = "{:url('Attr/tplForm',array('category_sign'=>$category_sign))}";
	var get_brand_uri = "{:url('Brand/ajaxList')}";
	var save_category_brand_uri = "{:url('CategoryBrand/saveData')}";
	var del_category_brand_uri = "{:url('CategoryBrand/ajaxDelete')}";
</script>
<script type="text/html" id="attr_tool">
	<div class="layui-btn-group">
		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" data-title="删除"><i class="layui-icon layui-icon-delete"></i></a>
		<a class="layui-btn layui-btn-danger layui-btn-xs hide-update" lay-event="update"><i class="layui-icon layui-icon-up"></i></a>
	</div>
</script>
<script type="text/html" id="attrToolbar">
  <div class="layui-btn-container">
    <button type="button" class="layui-btn layui-btn-sm" lay-event="addAttr"><i class="layui-icon layui-icon-add-1"></i>新增属性</button>
  </div>
</script>
<script type="text/html" id="is_mustTpl">
  <input type="checkbox" name="is_must" value="{{ d.attr_id}}" title="必填" lay-filter="is_mustTpl" {{ d.is_must == 1 ? 'checked' : '' }}>
</script>
<script type="text/html" id="fast_is_mustTpl">
  <input type="checkbox" name="fast_is_must" value="{{ d.attr_id}}" title="必填" lay-filter="fast_is_mustTpl" {{ d.fast_is_must == 1 ? 'checked' : '' }}>
</script>
<script type="text/html" id="value_typeTpl">
	<input type="checkbox" name="value_type" value="{{ d.attr_id}}" lay-skin="switch" lay-text="输入|选择" lay-filter="value_typeTpl" {{ d.value_type == 1 ? 'checked' : '' }}>
</script>
<script type="text/html" id="select_typeTpl">
	<input type="checkbox" name="select_type" value="{{ d.attr_id}}" lay-skin="switch" lay-text="默认|下拉" lay-filter="select_typeTpl" {{ d.select_type == 1 ? 'checked' : '' }}>
</script>
<script src="/static/js/category/attr/attr.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/js/category/category_tpl.js" type="text/javascript" charset="utf-8"></script>